/*
package org.itboys.core.service.mongo.web;

import org.itboys.commons.utils.tools.LongUtil;
import org.itboys.core.entity.mongo.SundayKnowledgeBase;
import org.itboys.mongodb.core.MongoDataSource;
import org.itboys.mongodb.service.BaseMongoService;
import org.itboys.param.PageResult;
import org.itboys.param.ParamUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;

*/
/**
 * Auther: 罗尧坤
 * Date: 2018/8/2
 * Description: 知识库服务类
 *//*


@Service
public class SundayKnowledgeBaseService extends BaseMongoService<SundayKnowledgeBase> {
    @Resource(name = "mobileDs")
    private MongoDataSource mobileDataSource;

    @Override
    protected MongoDataSource getMongoDataSource() {
        return mobileDataSource;
    }

    @Override
    protected Class<SundayKnowledgeBase> getEntityClass() {
        return SundayKnowledgeBase.class;
    }

    */
/**
     * 分页查询知识库
     * 支持模糊查询字段:
     * 问题关键字; 内容关键字;
     *
     * @param request
     * @return
     *//*

    public PageResult<SundayKnowledgeBase> select(HttpServletRequest request) {
        //
        Map<String, String> containsparam = ParamUtil.packageMongoVagueParam(
                request,
                "name",
                "text",
                "keyWords");
        Map<String, Object> param = ParamUtil.packageMongoExactParam(request);
        //添加查询条件, 后续加入创建人, 创建时间, 修改时间顺序
        param.put("isDeleted", 0);

        PageResult<SundayKnowledgeBase> result = super.containpageQuery(request, containsparam, param);
        return result;
    }

    */
/**
     * 查找单个知识库问答
     *
     * @param id
     * @return
     *//*

    public SundayKnowledgeBase findOne(Long id) {
        SundayKnowledgeBase knowledgeBase = null;

        if (LongUtil.isNotZreo(id)) {
            knowledgeBase = super.getById(id);
        } else {
            knowledgeBase = new SundayKnowledgeBase();
            System.err.println("");
        }
        return knowledgeBase;
    }

    */
/**
     * 保存知识库问答
     *
     * @param knowledgeBase
     *//*

    public void save(SundayKnowledgeBase knowledgeBase) {
        if (LongUtil.isZreo(knowledgeBase.getId())) {
            knowledgeBase.setHits(0);
            knowledgeBase.setStatus(0);
            super.save(knowledgeBase);
        } else {
            super.updateExceptEmpty(knowledgeBase.getId(), knowledgeBase);
        }
    }

    */
/**
     * 设置是否已经通用该知识库问答
     *
     * @param id
     * @param status
     *//*

    public void setStatus(Long id, Integer status) {
        super.update(id, "status", status);
    }

}
*/
